Advent Of Code 2017 - Day 1 Part 2 - Javascript